Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

separate get Trace actions into a new rest API #1672

Conversation

Zhangxunmt
Copy link
Collaborator

Description

Only return final results in the "List Conversation" API. Add a new API of "Get Trace" to return only traces for an interaction.

Issues Resolved

[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

/** Instance of this */
public static final GetTracesAction INSTANCE = new GetTracesAction();
/** Name of this action */
public static final String NAME = "cluster:admin/opensearch/ml/memory/trace/get";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trace is only for conversation agent, to make it general, maybe build a general search API for interaction data ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The general search API already exists. This "get trace" is only meant for the conversation agent to let FE use. The "list interaction" will only return interactions that have "null" trace_number (final response). In other agents, the "list interactions" API still works to list all interactions because the "trace_number" is null since it's only used in the conversational context.

Copy link

codecov bot commented Nov 22, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (becfbe0) 66.46% compared to head (c0bfaea) 66.42%.

Files Patch % Lines
.../opensearch/ml/rest/RestMemoryGetTracesAction.java 60.00% 2 Missing ⚠️
Additional details and impacted files
@@                        Coverage Diff                        @@
##             feature/agent_framework_dev    #1672      +/-   ##
=================================================================
- Coverage                          66.46%   66.42%   -0.04%     
- Complexity                          2520     2521       +1     
=================================================================
  Files                                231      232       +1     
  Lines                              12554    12560       +6     
  Branches                            1268     1268              
=================================================================
- Hits                                8344     8343       -1     
- Misses                              3657     3663       +6     
- Partials                             553      554       +1     
Flag Coverage Δ
ml-commons 66.42% <66.66%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Zhangxunmt Zhangxunmt merged commit 8e36de3 into opensearch-project:feature/agent_framework_dev Nov 22, 2023
3 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants